package edu.msg.hrappy.backend.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

@Entity
@Table(name = "Notification")
public class Notification extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String notification;
	private User user;
	private boolean seen;
	private Date date;
	
	public Notification() {
		
	}

	
	 @Column(name = "notification")
	    public String getNotification() {
	        return notification;
	    }

	    public void setNotification(String notification) {
	        this.notification = notification;
	    }

	 @Column(name = "seen")
	    public boolean isSeen() {
	        return seen;
	    }

	    public void setSeen(boolean seen) {
	        this.seen = seen;
	    }

	   
	    @ManyToOne
	    @JoinColumn(name="USER_ID")
	    public User getUser() {
	        return user;
	    }

	    public void setUser(User user) {
	        this.user = user;
	    }
	    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
	    @Column(name = "date")
	    public Date getDate() {
	        return (date == null) ? null : (Date) date.clone();
	    }

	    public void setDate(Date date) {
	        this.date = date;
	    }

}

